import request from 'umi-request';

export const changeStudentInfo = async (data: any) => {
    return request<any>('/student/update', {
        method: 'POST',
        data,
    });
};

export const changeTeacherInfo = async (data: any) => {
    return request<any>('/teacher/update', {
        method: 'POST',
        data,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
};

export const getStudentScore = async (data: any) => {
    return request<any>('/score/student', {
        method: 'GET',
        params: { studentId: data },
    });
};